package com.qf.pojo;

import org.springframework.stereotype.Component;

import java.util.*;

/**
 * @author zjw
 * @description 普通类
 * @date 2021/9/27$ 15:29$
 */
public class User {

    private String name;

    private String gender;

    private Integer age;

    private Date birthday;

    private String[] array;

    private List list;

    private Set set;

    private Map map;

    private Properties props;

    @Override
    public String toString() {
        return "User{" +
                "array=" + Arrays.toString(array) +
                ", list=" + list +
                ", set=" + set +
                ", map=" + map +
                ", props=" + props +
                '}';
    }

    public String[] getArray() {
        return array;
    }

    public void setArray(String[] array) {
        this.array = array;
    }

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public Set getSet() {
        return set;
    }

    public void setSet(Set set) {
        this.set = set;
    }

    public Map getMap() {
        return map;
    }

    public void setMap(Map map) {
        this.map = map;
    }

    public Properties getProps() {
        return props;
    }

    public void setProps(Properties props) {
        this.props = props;
    }

    public User() {
        System.out.println("User对象创建了！！！");
    }

    public User(String name, String gender, Integer age, Date birthday) {
        System.out.println("有参构造创建对象，并给属性赋值！！");
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.birthday = birthday;
    }

    public User(String name, Integer age, Date birthday) {
        this.name = name;
        this.age = age;
        this.birthday = birthday;
    }

    public void init(){
        System.out.println("对象初始化！");
    }

    public void destroy(){
        System.out.println("对象销毁！！");
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
}
